package com.cws.backup.thread;


import com.cws.backup.entity.BackupEntity;
import com.cws.backup.factory.BackUpHandlerFactory;
import com.cws.backup.factory.BackupHandler;

/**
 * @author cws
 */
public class BackupThread implements Runnable {

    BackupEntity backupEntity;

    public BackupThread() {
    }

    public BackupThread(BackupEntity backupEntity) {
        this.backupEntity = backupEntity;
    }

    @Override
    public void run() {
        BackupHandler backUpHandler = BackUpHandlerFactory.getBackUpHandler(backupEntity);
        backUpHandler.backup(backupEntity);
    }
}
